.chat-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  background: #f7f7f7;
}
.online-status{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.status1,
.status2 {
  padding: 3px 0;
  margin: 10px 0;
  width: 65vw;
  border-radius: 6px;
  background: #eeeeee;
  text-align: center;
}
.status1 {
  margin-top: 20px;
}
.status2 {
  color: red;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
}

.status-badge.online {
  background: #e8f5e9;
  color: #2e7d32;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f0f2f5;
}

.message-wrapper {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.message-content {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 80%;
}

.message-left .message-content {
  margin-right: auto;
}

.message-right .message-content {
  flex-direction: row-reverse;
  margin-left: auto;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  max-width: 100%;
}

.message-left .message-bubble {
  background: #fff;
  border-bottom-left-radius: 4px;
}
.message-left .message-bubble:hover{
  background: #ccc;
}

.message-right .message-bubble {
  background: #95ec69;
  border-bottom-right-radius: 4px;
}
.message-right .message-bubble:hover{
  background: #69eccb;

}

.message-left .message-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}


.message-right .message-bubble::before {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: #95ec69;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  /* clip-path: polygon(0 0, 0 100%, 100% 100%); 这行代码是CSS中的一个属性设置，用于定义一个元素的裁剪路径。clip-path 属性允许你创建一个裁剪区域，这个区域内的部分会被显示，而区域外的部分则会被隐藏。这里使用的是 polygon 函数来定义一个多边形裁剪路径。 */
}

.text-message {
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}

.image-message img {
  max-width: 100%;
  border-radius: 12px;
  cursor: pointer;
}

.file-message {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.file-icon {
  font-size: 24px;
  color: #1976d2;
}

.file-name {
  color: #1976d2;
  text-decoration: underline;
}

.message-time {
  font-size: 12px;
  color: #8e8e8e;
  margin-top: 4px;
  padding: 0 48px;
  text-align: center;
}

.input-container {
  background: #f0f2f5;
  padding: 16px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.input-wrapper {
  background: #fff;
  border-radius: 24px;
  padding: 8px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.message-input {
  flex: 1;
  border: none;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.4;
  max-height: 120px;
  background: transparent;
}

.message-input:focus {
  outline: none;
}

.send-button {
  background: #07c160;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.send-button:hover {
  background: #06ae56;
}

.emoji-panel {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 16px;
}

.emoji-item {
  font-size: 1.5rem;
  text-align: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.emoji-item:hover {
  background: #f5f5f5;
}